//
//  HZPeiziAccoutMoneyVC.m
//  Stock_Stategy
//
//  Created by MayerF on 2017/11/29.
//  Copyright © 2017年 MayerF. All rights reserved.
//

#import "HZPeiziAccoutMoneyVC.h"
#import "HZPeiziAccountMoneyView.h"

@interface HZPeiziAccoutMoneyVC ()
@property (nonatomic, strong)HZPeiziAccountMoneyView *pAccountView;
@property (nonatomic, strong)HZPeiziAccountMoneyModel *money;
@end

@implementation HZPeiziAccoutMoneyVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"账户资产";
    
    _pAccountView = [HZPeiziAccountMoneyView new];
    [self.view addSubview:_pAccountView];
    [_pAccountView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self.view);
    }];
    
    NSDictionary *dict = self.params;
    if ([dict.allKeys containsObject:@"param"]) {
        _money = dict[@"param"];
    }
}
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    
    if ([_money isKindOfClass:[HZPeiziAccountMoneyModel class]]) {
        [_pAccountView updateAccountData:_money];
    }
}

@end
